remove unused enum
authorHavoc Pennington <hp@pobox.com>
Mon, 8 Oct 2001 05:01:09 +0000 (05:01 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Mon, 8 Oct 2001 05:01:09 +0000 (05:01 +0000)
2001-10-08  Havoc Pennington  <hp@pobox.com>

* demos/gtk-demo/stock_browser.c: remove unused enum

* gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
pass the current selection state of the node in to the user
selection func

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
demos/gtk-demo/stock_browser.c
gtk/gtktreeselection.c
gtk/gtktreeselection.h

index 07c1b6b6fe0dfb370bdefe72bb7176da7b85333f..048dacbf49c911683f218cf07e3798b238ed99d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-10-08  Havoc Pennington  <hp@pobox.com>
+
+       * demos/gtk-demo/stock_browser.c: remove unused enum
+
+       * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+       pass the current selection state of the node in to the user
+       selection func
+
 2001-10-06  Matthias Clasen  <matthiasc@poet.de>
 
        * gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to 
index 07c1b6b6fe0dfb370bdefe72bb7176da7b85333f..048dacbf49c911683f218cf07e3798b238ed99d2 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-08  Havoc Pennington  <hp@pobox.com>
+
+       * demos/gtk-demo/stock_browser.c: remove unused enum
+
+       * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+       pass the current selection state of the node in to the user
+       selection func
+
 2001-10-06  Matthias Clasen  <matthiasc@poet.de>
 
        * gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to 
index 07c1b6b6fe0dfb370bdefe72bb7176da7b85333f..048dacbf49c911683f218cf07e3798b238ed99d2 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-08  Havoc Pennington  <hp@pobox.com>
+
+       * demos/gtk-demo/stock_browser.c: remove unused enum
+
+       * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+       pass the current selection state of the node in to the user
+       selection func
+
 2001-10-06  Matthias Clasen  <matthiasc@poet.de>
 
        * gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to 
index 07c1b6b6fe0dfb370bdefe72bb7176da7b85333f..048dacbf49c911683f218cf07e3798b238ed99d2 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-08  Havoc Pennington  <hp@pobox.com>
+
+       * demos/gtk-demo/stock_browser.c: remove unused enum
+
+       * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+       pass the current selection state of the node in to the user
+       selection func
+
 2001-10-06  Matthias Clasen  <matthiasc@poet.de>
 
        * gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to 
index 07c1b6b6fe0dfb370bdefe72bb7176da7b85333f..048dacbf49c911683f218cf07e3798b238ed99d2 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-08  Havoc Pennington  <hp@pobox.com>
+
+       * demos/gtk-demo/stock_browser.c: remove unused enum
+
+       * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+       pass the current selection state of the node in to the user
+       selection func
+
 2001-10-06  Matthias Clasen  <matthiasc@poet.de>
 
        * gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to 
index 07c1b6b6fe0dfb370bdefe72bb7176da7b85333f..048dacbf49c911683f218cf07e3798b238ed99d2 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-08  Havoc Pennington  <hp@pobox.com>
+
+       * demos/gtk-demo/stock_browser.c: remove unused enum
+
+       * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+       pass the current selection state of the node in to the user
+       selection func
+
 2001-10-06  Matthias Clasen  <matthiasc@poet.de>
 
        * gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to 
index 07c1b6b6fe0dfb370bdefe72bb7176da7b85333f..048dacbf49c911683f218cf07e3798b238ed99d2 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-08  Havoc Pennington  <hp@pobox.com>
+
+       * demos/gtk-demo/stock_browser.c: remove unused enum
+
+       * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+       pass the current selection state of the node in to the user
+       selection func
+
 2001-10-06  Matthias Clasen  <matthiasc@poet.de>
 
        * gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to 
index 5594a423d65067877f57a3268ce01b4f6a527640..b66edda1ae015a087d22126aacb432cf48e0217e 100644 (file)
@@ -81,14 +81,6 @@ struct _StockItemDisplay
   GtkWidget *icon_image;
 };
 
-/* columns in the tree model */
-enum {
-  COLUMN_ICON_MACRO,
-  COLUMN_LABEL,
-  COLUMN_ACCEL,
-  COLUMN_ID
-};
-
 static gchar*
 id_to_macro (const gchar *id)
 {
index a524400068fd1ff48a79171e6bef8100b43364c6..cbf2c43a5b3f4a7f274cd57c1733b60839bef959 100644 (file)
@@ -245,6 +245,8 @@ gtk_tree_selection_get_mode (GtkTreeSelection *selection)
  *
  * Sets the selection function.  If set, this function is called before any node
  * is selected or unselected, giving some control over which nodes are selected.
+ * The select function should return %TRUE if the state of the node may be toggled,
+ * and %FALSE if the state of the node should be left unchanged.
  **/
 void
 gtk_tree_selection_set_select_function (GtkTreeSelection     *selection,
@@ -1010,7 +1012,9 @@ gtk_tree_selection_real_select_node (GtkTreeSelection *selection,
       path = _gtk_tree_view_find_path (selection->tree_view, tree, node);
       if (selection->user_func)
        {
-         if ((*selection->user_func) (selection, selection->tree_view->priv->model, path, selection->user_data))
+         if ((*selection->user_func) (selection, selection->tree_view->priv->model, path,
+                                       GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED),
+                                       selection->user_data))
            selected = TRUE;
        }
       else
index 11286bdabff3b7e5db748454b35a5cf29bda0ea7..2ef1a31e7b3c19030e44c4386be38e36ca4ba38c 100644 (file)
@@ -37,6 +37,7 @@ extern "C" {
 typedef gboolean (* GtkTreeSelectionFunc)    (GtkTreeSelection  *selection,
                                              GtkTreeModel      *model,
                                              GtkTreePath       *path,
+                                              gboolean           path_currently_selected,
                                              gpointer           data);
 typedef void (* GtkTreeSelectionForeachFunc) (GtkTreeModel      *model,
                                              GtkTreePath       *path,